package com.iooiee.iocbeanlifecicle;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/**
 * Created with IntelliJ IDEA.
 * Description:
 *
 * @Author: Yanggc
 * DateTime: 2020-05-22
 */
@Configuration
@ComponentScan(basePackages = {"com.iooiee.iocbeanlifecicle"})
public class MainConfig {

	@Bean(initMethod = "initPerson")
	public Person person(){
		Person person = new Person();
		person.setName("张三");
		person.setSex("男");
		return person;
	}
}
